Using the natural irreducible 8-dimensional representation and the two spin representations of the quantum group $U_q$(D$_4$) of D$_4$, we construct a quantum analogue of the split octonions and study its properties. We prove that the quantum octonion algebra satisfies the q-Principle of Local Triality and has a nondegenerate bilinear form which satisfies a q-version of the composition property. By its construction, the quantum octonion algebra is a nonassociative algebra with a Yang-Baxter operator action coming from the R-matrix of $U_q$(D$_4$). The product in the quantum octonions is a $U_q$(D$_4$)-module homomorphism. Using that, we prove identities for the quantum octonions, and as a consequence, obtain at $q = 1$ new ``representation theory'' proofs for very well-known identities satisfied by the octonions. In the process of constructing the quantum octonions we introduce an algebra which is a q-analogue of the 8-dimensional para-Hurwitz algebra.